package com.example.testrest;

import java.io.IOException;
import java.util.Vector;

import org.restlet.resource.ClientResource;
import org.restlet.resource.ResourceException;

import restlet.interfaces.AllPlacesReseurceI;
import beans.MestoBean;

public class TestPlaces {
	public static void main(String[] args) throws ResourceException,
			IOException {

		ClientResource cr = new ClientResource(
				"http://localhost:8888/rest/places");
		AllPlacesReseurceI placesResourceI = cr.wrap(AllPlacesReseurceI.class);
		Vector<MestoBean> allPlaces = placesResourceI.allPlaces();

		for (MestoBean mesto : allPlaces) {
			System.out.println(mesto.getId() + " , " + mesto.getNaziv());
		}

	}
}
